@use "vars";

// =============================================================================
// start of @material
//
// This is a little annoying, but because Vite treats `aliases` the same whether
// it's scss or js, we need to be explicit for our `@material` imports

@use "../../../../../node_modules/@material/theme" with (
  $primary: vars.$primary,
  $secondary: vars.$secondary,
  $on-primary: vars.$on-primary,
  $on-secondary: vars.$on-secondary,
);

@use "../../../../../node_modules/@material/typography" with (
    $font-family: ("Inter", sans-serif)
);

@use "../../../../../node_modules/@material/circular-progress";

// end of @material
// =============================================================================

@import "material-components-web/material-components-web";
@import "fonts";
@import "codemirror/lib/codemirror";

@import "scrollbar";
@import "ansi";
@import "themes/jupyter";

$mdcComponentPadding: 16px;
$codeSize: 14px;
$defaultFontSize: 15px;
$borderColor: rgba(0, 0, 0, 0.12);
$stepBorderRadius: 6px;

$pipelineStepHeight: 105px;
$pipelineStepWidth: 190px;

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

*:focus {
  outline: none;
}

html,
body {
  height: 100%;
}

p {
  &.padding-top {
    padding-top: var(--space-5);
  }
  &.padding-bottom {
    padding-bottom: var(--space-5);
  }
}

.mdc-drawer__content {
  position: relative;
}

.mdc-drawer .mdc-list-item {
  font-weight: 400;
}

aside.mdc-drawer {
  h1 {
    position: absolute;
    bottom: 0;
    width: 100%;
  }
}

h1,
h3 {
  font-weight: 400;
}

h2 {
  font-weight: 500;
}

.mdc-checkbox {
  --mdc-theme-primary: #{theme.$secondary};
}

.mdc-drawer--dismissible {
  position: relative;
}

#root {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.create-job-modal {
  .mdc-linear-progress {
    margin: var(--space-5) 0;
  }
}

header {
  height: 80px;
  padding: calc(var(--space-5) / 2);
  border-bottom: 1px solid $borderColor;
  position: relative;

  .header-left,
  .header-actions {
    display: flex;
    align-items: center;
  }

  .header-actions {
    button {
      margin-left: calc(var(--space-5) / 2);
      &:first-child {
        margin-left: 0;
      }
    }
  }

  .header-left {
    button.mdc-icon-button {
      font-size: 32px;
      padding: 8px;
    }
  }

  img.logo {
    height: auto;
    box-sizing: content-box;
    width: 50px;
    padding-right: var(--space-5);
    padding-left: 10px;
    display: inline-block;
  }

  display: flex;
  justify-content: space-between;

  .pipeline-header-component {
    > div {
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: row;
      width: 100%;
      height: 100%;
      position: relative;
    }

    .pipelineStatusIndicator {
      float: left;
      margin-right: 10px;
      height: 24px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      margin-top: 1px;

      .mdc-circular-progress {
        width: 24px;
        height: 24px;
      }

      .mdc-circular-progress__indeterminate-circle-graphic {
        stroke: black;
      }
    }

    button {
      position: absolute;
      right: var(--space-5);
      top: 50%;
      transform: translateY(-50%);
    }

    .pipeline-name {
      font-size: 21px;
    }
  }
}

.app-container {
  display: flex;
  flex: 1;
  overflow: hidden;

  > .mdc-drawer {
    flex: initial;
    --mdc-drawer-width: 325px;
    min-width: 325px;
    padding: 20px;
    height: 100%;
    text-align: center;
  }

  > main {
    overflow: hidden;
    flex: 1;
  }
}

.mdc-data-table__table-container {
  overflow: visible;
}

.mdc-data-table {
  &.row-clickable {
    tbody tr {
      &:hover {
        box-shadow: 0px 2px 2px 0px rgb(0 0 0 / 12%);
      }
      cursor: pointer;
    }
  }
}

.help-list {
  .mdc-list {
    font-size: $defaultFontSize;
  }
}

a.button {
  text-decoration: none;
  color: #000;
}

.view-page {
  padding: var(--space-5);
  overflow-y: auto;
  height: 100%;

  &:not(.job-view) {
    p {
      line-height: 1.5;
    }
  }

  &.orchest-settings {
    h3 {
      margin-top: var(--space-10);
      margin-bottom: calc(var(--space-5) / 2);
    }
    .columns {
      .column {
        &:nth-child(2n) {
          padding-left: 2.5%;
        }
        &:nth-child(2n + 1) {
          padding-right: 2.5%;
        }
      }
    }
  }

  &.jupyter {
    .hiddenSession {
      display: none;
    }

    .lab-loader {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100%;

      > div {
        width: 100%;
        max-width: 400px;

        h2 {
          margin-bottom: var(--space-5);
          text-align: center;
        }
      }
    }
  }

  &.no-padding {
    padding: 0;
  }

  h2 {
    padding-bottom: var(--space-5);
  }

  &.update-page {
    .console-output {
      width: 100%;
      max-width: 800px;
    }
  }

  .jobs-page {
    .mdc-data-table {
      width: 100%;
    }

    .mdc-text-field--outlined.search {
      margin-bottom: var(--space-5);
    }

    .job-actions {
      margin-bottom: var(--space-5);
    }
  }
}

.project-settings-form {
  display: flex;
  flex-direction: column;
  height: 100%;

  .project-settings {
    flex: 1;
    overflow-y: auto;
  }
}

.pipeline-settings {
  display: flex;
  flex-direction: column;
  height: 100%;

  .tab-view {
    flex: 1;
    overflow-y: auto;
  }
}

.notice {
  p {
    color: #555;
    font-size: $codeSize;
  }
}

.projects-view {
  .mdc-data-table {
    .mdc-button {
      color: theme.$secondary;
      font-weight: 500;
    }

    .mdc-data-table__header-cell:nth-child(1),
    .mdc-data-table__header-cell:nth-child(2),
    .mdc-data-table__cell:nth-child(1),
    .mdc-data-table__cell:nth-child(2) {
      text-align: left;
    }

    .mdc-data-table__header-cell,
    .mdc-data-table__cell {
      text-align: center;
    }
  }
}

p > i.material-icons.float-left {
  float: left;
  margin-right: 10px;
}

.datetime-input {
  > div {
    margin-bottom: var(--space-5);
  }
}

.select-button-columns {
  display: flex;

  .mdc-button {
    height: 56px;
    min-width: 200px;
    margin-left: $mdcComponentPadding;
  }
}

.create-file-input {
  .field-select-combo {
    display: flex;

    .mdc-text-field {
      width: 70%;
      margin-right: $mdcComponentPadding;
    }
    .mdc-select {
      flex: 1;
    }
  }
}

/* override title styling on overflow */
.mdc-dialog--scrollable .mdc-dialog__title {
  padding-bottom: 9px;
}
.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__title,
.mdc-dialog.mdc-dialog--scrollable .mdc-dialog__actions {
  border-color: transparent;
}
.mdc-dialog--scrollable .mdc-dialog__content {
  padding-top: 0;
  padding-bottom: 20px;
}

// rounded notched buttons
.mdc-text-field--outlined {
  .mdc-text-field__input {
    padding: 0 $mdcComponentPadding;
  }

  .mdc-notched-outline {
    .mdc-notched-outline__leading {
      border-radius: 28px 0 0 28px;
      width: 28px;
    }

    .mdc-notched-outline__trailing {
      border-radius: 0 28px 28px 0;
    }
  }
}

.mdc-tab-bar-holder {
  display: flex;
  border-bottom: 1px solid $borderColor;

  .mdc-tab-bar {
    width: auto;
  }
}

.form-helper-text {
  font-size: $codeSize;
  margin-top: 10px;
}

.CodeMirror {
  font-size: $codeSize;
}

.environments-page {
  .mdc-data-table {
    span {
      i.material-icons {
        float: left;
        margin-right: 8px;
        margin-top: 3px;

        &.lens-button {
          color: #7dd467;
          font-size: 15px;

          &.disabled {
            color: #999;
          }
        }
      }
    }
  }
}

.xterm-holder {
  background: #000;
  padding: 5px;
  overflow: hidden;
}

.build-notice {
  font-size: $codeSize;
  display: inline-block;
  &.subtle {
    color: #555;
  }

  span.build-label {
    display: inline-block;
    min-width: 130px;
  }
}

.edit-environment {
  .xterm-holder {
    &.initializing {
      position: absolute;
      opacity: 0.01;
    }
  }

  .CodeMirror {
    height: auto;
  }
}

.jupyterlab-config-page,
.edit-environment {
  .xterm {
    height: 400px;
    width: 100%;
  }
}

.separated {
  > :last-child {
    margin-right: 0;
  }
  > * {
    margin-right: var(--space-5);
  }
}

.push-down {
  margin-bottom: var(--space-5);
}

.push-down-7 {
  margin-bottom: var(--space-7);
}

.push-up {
  margin-top: var(--space-5);
}
.push-left {
  margin-left: var(--space-5);
}
.push-right {
  margin-right: var(--space-5);
}

.persistent-view {
  flex: 1;
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  &.hidden {
    display: none;
  }

  &.jupyter {
    iframe {
      border: 0;
      display: block;
    }
  }
}

.file-viewer {
  .file-description,
  p {
    padding: var(--space-5);

    h3 {
      font-weight: 500;
    }
  }

  .file-description {
    border-bottom: 1px solid $borderColor;
    z-index: 9;

    .step-navigation {
      overflow: auto;
      padding-top: var(--space-5);

      .parents {
        float: left;
        button {
          margin-right: $mdcComponentPadding;
          &:last-of-type {
            margin-right: 0;
          }
        }
      }
      .children {
        float: right;
        text-align: right;

        button {
          margin-left: $mdcComponentPadding;
          &:first-of-type {
            margin-left: 0;
          }
        }
      }
      span {
        font-size: $codeSize;
        display: block;
        color: #999;
      }
    }
  }

  display: flex;
  flex-direction: column;

  .file-holder {
    flex: 1;
    flex-grow: 1;
  }

  .react-codemirror2 {
    padding: var(--space-5);

    .CodeMirror {
      width: 100%;
      height: 100%;
    }

    width: 100%;
    height: 100%;
  }
}

iframe.borderless {
  border: 0;
  display: block;
}
iframe.fullsize {
  width: 100%;
  height: 100%;
}

.hidden {
  display: none;
}

button.text-button {
  border: 0;
  border-bottom: 1px dotted #c6cbd1;
  background: none;
  &:hover {
    border-bottom: 1px solid black;
  }
  cursor: pointer;
}

.top-buttons {
  position: absolute;
  top: var(--space-5);
  right: var(--space-5);
  z-index: 99;

  button {
    margin-left: 10px;
    &:first-of-type {
      margin-left: 0;
    }
  }
}

.bottom-buttons {
  background: #fff;
  width: 100%;
  margin-left: -var(--space-5);
  padding-left: var(--space-5);
  padding-right: var(--space-5);
  box-sizing: content-box;

  &.overflowing {
    box-shadow: 0px -9px 8px rgba(0, 0, 0, 0.05);
  }

  button {
    margin-right: var(--space-5);
    margin-top: var(--space-5);

    &:last-of-type {
      margin-right: 0;
    }
  }
}

.view-project-settings {
  ul {
    list-style-type: none;
  }

  .top-labels {
    font-size: 14px;

    button.text-button {
      font-size: 16px;
    }

    h3 {
      font-size: 21px;
    }
  }

  .project-settings {
    flex: 1;
    overflow: auto;
  }
}

.pipeline-settings-view {
  .tab-content {
    padding: var(--space-5) 0;
  }

  ul {
    list-style-type: none;
  }

  .CodeMirror {
    height: auto;
  }

  form {
    button {
      margin-top: var(--space-5);
    }
  }
}

.environment-properties {
  max-width: 800px;
}

.environment-variables-list {
  ul {
    list-style-type: none;
  }

  div.mdc-text-field {
    width: 40%;
  }
}

h2.header {
  padding: var(--space-5);
  background: #f5f5f5;
  font-weight: normal;
}

.new-job {
  b {
    display: inline-block;
  }

  .steps {
    padding: var(--space-5);
  }

  .step {
    margin-bottom: var(--space-5);
  }

  .argument-set {
    margin-bottom: 5px;
  }

  .argument-label {
    display: inline-block;
  }

  .argument-values {
    display: inline-block;

    span {
      display: inline-block;
      padding: 5px;
      background: $borderColor;
      margin-left: 10px;
      cursor: pointer;
      opacity: 0.5;
      transition: 0.3s ease all;

      &.selected {
        opacity: 1;
      }
    }
  }
}

span.floating-button {
  float: left;
  display: block;
  i {
    font-size: 30px;
    padding-top: 3px;
  }

  .mdc-circular-progress {
    transform: scale(0.888888);
  }

  &.pipeline-save-status {
    i {
      color: #999;
    }
  }
}

.job-view {
  display: flex;
  flex-direction: column;

  .pipeline-tab-view {
    .search {
      margin-bottom: var(--space-5);
    }
  }

  .buttons {
    background: #fff;

    button {
      margin-right: var(--space-5);

      &:last-of-type {
        margin-right: 0;
      }
    }
  }

  .pipeline-runs {
    .pipeline-run-detail {
      padding: $mdcComponentPadding;
    }
  }

  .existing-pipeline-runs {
    .mdc-data-table {
      $sizes: 10%, 60%, 30%;

      @for $i from 1 through length($sizes) {
        .mdc-data-table__header-cell:nth-child(#{$i}) {
          width: nth($sizes, $i);
        }
      }

      @for $i from 1 through length($sizes) {
        .mdc-data-table__cell:nth-child(#{$i}) {
          width: nth($sizes, $i);
        }
      }

      .pipeline-run-detail {
        button {
          margin-top: var(--space-5);
        }
      }

      table {
        width: 100%;
        table-layout: fixed;
      }
      th {
      }
      th,
      td {
        overflow: hidden;
        display: inline-block;
        max-width: 100%;
        padding: $mdcComponentPadding;
      }
    }

    button {
      margin-top: var(--space-5);
    }
  }

  .tab-view {
    padding: var(--space-5) 0;
    flex: 1;
    overflow: auto;
  }

  .top-labels {
    padding-bottom: var(--space-5);
    font-size: 14px;

    h3 {
      font-size: 21px;
    }
  }

  .mdc-tab-bar {
    margin-top: var(--space-5);
  }
}

.warning {
  padding: calc(var(--space-5) / 2);
  border-radius: 3px;
  color: #fff;
  background: #b00020;
  font-size: 15px;

  .material-icons {
    float: left;
    margin-right: 10px;
    margin-top: -4px;
  }

  a {
    color: inherit;
  }
}

.parameter-tree {
  b {
    font-weight: 500;
    display: inline-block;
    margin: 10px 0;

    &:first-of-type {
      margin-top: 0;
    }
  }

  .param-block {
    margin-bottom: 20px;

    &:last-of-type {
      margin-bottom: 0;
    }
  }

  h3 {
    margin-bottom: 10px;
  }

  .step-params {
    .parameter-key {
      margin-left: 20px;
    }
  }

  .parameter-key,
  .parameter-value {
    display: inline-block;
  }

  .parameter-row {
    margin-bottom: 5px;
  }

  .parameter-value {
    &.editable {
      color: theme.$secondary;
      text-decoration: underline;
      cursor: pointer;
    }

    padding-left: 5px;
  }
}

.mdc-data-table {
  a {
    color: theme.$secondary;
    text-decoration: underline;
  }
}

.mdc-circular-progress {
  width: 36px;
  height: 36px;
}

.mdc-data-table__table {
  width: 100%;
}

.dropdown-file-picker {
  position: relative;

  .mdc-list-item {
    .material-icons {
      margin-right: $mdcComponentPadding/2;
      font-size: 1.3rem;
    }

    line-height: 2.25rem;
    height: auto;
  }

  .mdc-menu {
    position: absolute;
    left: 0;
    top: 100%;
  }
}

.pipeline-settings {
  .columns {
    .column:nth-child(1) {
      width: 30%;
    }
    margin-bottom: var(--space-5);
  }
}

.columns {
  .column {
    width: 50%;
    float: left;
    min-height: 1px;
  }
  &.three {
    .column {
      width: 33.33%;
    }
  }
  &.four {
    .column {
      width: 25%;
    }
  }
}

.console-output {
  font-family: monospace;
  font-size: 13px;
  background: #000;
  color: #fff;
  padding: calc(var(--space-5) / 2);
  white-space: pre-line;
  overflow-x: auto;
}

button.themed-secondary {
  &:not(:disabled) {
    background-color: theme.$secondary;
  }

  &:disabled {
    background: rgba(0, 0, 0, 0.12);
  }
}

.disabled-text {
  color: rgba(0, 0, 0, 0.37);
}

.fullwidth {
  width: 100%;
}

.multi-button {
  button {
    margin-left: $mdcComponentPadding;
  }

  button:first-child {
    margin-left: 0;
  }
}

.docs-notice {
  background: whitesmoke;
  border-radius: 3px;
  padding: 10px;
  color: #333;
  font-size: $defaultFontSize;

  a {
    color: theme.$secondary;
  }
}

span.code {
  font-family: monospace;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
  padding: 2px 4px;
  display: inline-block;
  margin-bottom: 4px;
}

.mdc-switch-wrapper {
  display: flex;
  align-items: center;
  flex-direction: row;

  label {
    padding-left: 10px;
  }
}

.pipeline-view {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: row;

  .mdc-button--outlined {
    background: #fff;
  }

  .pipeline-actions {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 9;
    padding: var(--space-5);

    &.bottom-right {
      top: auto;
      bottom: 0;
      right: 0;
      left: auto;

      button {
        margin: 0;
      }
    }

    &.top-left {
      top: auto;
      left: 0;
      bottom: auto;
      right: auto;
    }

    &.bottom-left {
      top: auto;
      bottom: 0;
      right: auto;
      left: 0;

      button {
        margin-bottom: 0;
        margin-top: var(--space-5);
      }

      .navigation-buttons {
        display: inline-block;
      }

      .selection-buttons {
        display: inline-block;
        padding-left: var(--space-5);
      }
    }

    button {
      &:last-of-type {
        margin-right: 0;
      }

      margin-right: var(--space-5);
      margin-bottom: var(--space-5);
      min-width: 0;
    }
  }

  .pipeline-steps-outer-holder {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: absolute;

    &.dragging {
      cursor: grabbing;

      .pipeline-steps-holder {
        .pipeline-step {
          &:active {
            background: #fff;
          }
        }
      }
    }
  }

  .pipeline-steps-holder {
    height: 100%;
    position: absolute;
    user-select: none;
    background-image: url("/image/cross-fill.svg");
    background-repeat: repeat;
    border: 1px solid #e5e5e5;

    .step-selector {
      position: absolute;
      z-index: 0;
      background: rgba(0, 0, 0, 0.1);
    }

    .connection {
      position: absolute;
      left: 0;
      top: 0;

      z-index: 1;

      &.selected {
        &:after {
          background-image: url("/image/arrow-head-blue.svg");
        }
      }

      &:after {
        position: absolute;
        content: " ";
        display: block;
        width: 12px;
        height: 12px;
        background-image: url("/image/arrow-head.svg");
        background-size: contain;
        background-repeat: no-repeat;
        right: 7px;
        bottom: -1px;
        transition: 0s opacity ease;
      }

      &.flipped {
        &:after {
          bottom: auto;
          top: -1px;
        }
      }

      &.flipped-horizontal {
        &:after {
          opacity: 0;
        }
      }

      pointer-events: none;

      svg {
        float: left;
        pointer-events: none;

        path {
          cursor: pointer;
          pointer-events: all;
        }
      }
    }

    .pipeline-step {
      position: absolute;
      background: #fff;
      padding: calc(var(--space-5) / 2) var(--space-5);
      border: 1px solid $borderColor;
      border-radius: $stepBorderRadius;
      cursor: pointer;
      user-select: none;
      width: $pipelineStepWidth;
      height: $pipelineStepHeight;
      text-align: center;
      z-index: 2;
      line-height: normal;

      &.hidden {
        display: none;
      }

      .execution-indicator {
        position: absolute;
        width: 100%;
        background: #eee;
        left: 0;
        bottom: 0;
        font-size: 12px;
        padding: 4px;
        color: #666;
        opacity: 1;
        border-radius: 0 0 6px 6px;

        span.success {
          color: #16bd43;
        }
        span.failure {
          color: red;
        }
        span.aborted {
          color: orange;
        }
      }

      &.running {
        .execution-indicator {
          background: theme.$secondary;
          color: #fff;
        }
      }

      box-shadow: 0 4px 8px -1px rgba(0, 0, 0, 0.1);

      &.selected {
        border-color: theme.$secondary;
        background: rgb(245, 245, 255);
      }

      &:active {
        background: rgb(250, 250, 250);
      }

      &.creating-connection {
        &:active {
          background: #fff;
        }
      }

      .step-label-holder {
        display: block;
        height: 100%;
        overflow: hidden;
        transform: translateY(-11px);
      }

      .step-label {
        text-overflow: ellipsis;
        height: calc(#{$pipelineStepHeight} - var(--space-5));
        max-height: calc(#{$pipelineStepHeight} - var(--space-5));
        width: calc(#{$pipelineStepWidth} - var(--space-5) * 2);
        max-width: calc(#{$pipelineStepWidth} - var(--space-5) * 2);
        display: table-cell;
        vertical-align: middle;
        overflow: hidden;
        font-size: $defaultFontSize;
      }
      span.filename {
        display: block;
        font-size: 14px;
        padding-top: 4px;
        color: #555;
      }

      .connection-point {
        display: block;
        width: 30px;
        height: 30px;
        border-radius: 30px;

        &.hover {
          .inner-dot {
            background: theme.$secondary;
          }
        }

        .inner-dot {
          background: black;
          border-radius: 10px;
          width: 10px;
          height: 10px;
          margin-left: 10px;
          margin-top: 10px;
          pointer-events: none;
        }

        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        left: -16px;
        transition: left 0.3s ease;

        &.outgoing-connections {
          right: -16px;
          left: auto;
        }
      }
    }
  }

  .col-drag-resize {
    position: absolute;
    top: 0;
    height: 100%;
    width: 10px;
    margin-left: -5px;
    user-select: none;
    cursor: col-resize;
  }

  .pane {
    position: relative;

    &.pipeline-view-pane {
      flex-grow: 1;
      overflow: hidden;
    }
  }

  .pipeline-details {
    height: 100%;
    padding: var(--space-5) 0;
    background: #fff;
    border-left: 1px solid $borderColor;
    z-index: 12;
    width: 0;

    .CodeMirror {
      height: 100%;
    }

    .overflowable {
      padding: 0 var(--space-5);
    }

    .mdc-select__anchor {
      width: 100%;
    }

    .detail-subview {
      flex: 1;
    }

    .log-content {
      height: 100%;

      > div {
        height: 100%;
        > div.xterm {
          height: 100%;
        }
      }
    }

    .input-group {
      margin-bottom: var(--space-5);
    }

    .connection-list {
      &.dragging {
        .connection-item {
          transition: transform 0.3s ease;
        }
      }

      .connection-item {
        overflow: auto;
        padding: 10px 0;
        cursor: pointer;
        user-select: none;

        span.filename {
          color: #555;
          display: inline-block;
        }

        &.swapped-up {
          transform: translateY(-100%);
        }
        &.swapped-down {
          transform: translateY(100%);
        }

        &.selected {
          transition: none;
        }

        i.material-icons {
          float: left;
          padding-right: 10px;
          margin-top: -2px;
        }
      }
    }

    .mdc-text-field--textarea {
      textarea {
        font: inherit;
        font-family: monospace;
        font-size: $defaultFontSize;
      }
      width: 100%;
    }

    display: flex;
    flex-direction: column;

    .overflowable {
      overflow-y: auto;
      overflow-x: hidden;
      flex: 1;
      display: flex;
      flex-direction: column;

      &.overflown {
        padding-right: var(--space-5);
      }
    }

    .action-buttons-bottom {
      padding: var(--space-5);
      padding-bottom: 0;

      .file-actions {
        margin-bottom: var(--space-5);

        button {
          display: block;

          margin-bottom: var(--space-5);
          &:last-child {
            margin-bottom: 0;
          }
        }
      }

      button {
        margin-right: var(--space-5);
      }
    }

    h3 {
      margin-bottom: 20px;
      font-weight: 400;
      font-size: 21px;
    }

    .multi-field-input {
      padding-bottom: 20px;
    }
  }
}

.pipelines-view {
  .mdc-list-item {
    .material-icons {
      font-size: 20px;
      margin-left: 10px;
      color: #34ef34;
    }
  }
}

table {
  .mdc-data-table__header-cell.mdc-data-table__header-cell--checkbox,
  .mdc-data-table__cell.mdc-data-table__cell--checkbox {
    width: 56px;
  }
}

.mdc-dialog {
  z-index: 99;
}

.mdc-dialog__surface {
  overflow: visible;

  .mdc-dialog__actions {
    padding: var(--space-5);
    padding-top: 0;
  }

  .mdc-dialog__content {
    overflow: visible;
    line-height: inherit;
  }

  .mdc-select__menu {
    position: absolute;
  }
}

.project-selector {
  width: 250px;
}

.mdc-select {
  &.fullwidth {
    .mdc-select__anchor {
      width: 100%;
    }
  }

  .mdc-select__selected-text {
    text-overflow: ellipsis;
    overflow: hidden;
  }
}

.multi-field-input {
  > div {
    float: left;
    width: 50%;

    &:nth-child(2) {
      width: 50%;
    }
  }
}

.clear {
  clear: both;
  display: block;
}

.commit-form {
  width: 50%;

  .mdc-select__anchor {
    width: 100%;
  }
  > div {
    width: 100%;
  }
}

.connection-form {
  width: 50%;

  > div {
    width: 100%;
  }
  .mdc-select__anchor {
    width: 100%;
  }
}

.mdc-drawer-app-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

@media only screen and (min-width: 1201px) {
  .columns {
    &.inner-padded {
      .column:nth-child(1) {
        padding-right: var(--space-5);
      }
      .column:nth-child(2) {
        padding-left: var(--space-5);
      }
    }
  }
}

@media only screen and (max-width: 1200px) {
  .view-page {
    &.orchest-settings {
      .columns {
        .column {
          &:nth-child(2n) {
            padding-left: 0;
          }
          &:nth-child(2n + 1) {
            padding-right: 0;
          }
        }
      }
    }
  }

  .columns {
    .column {
      width: 100%;
      padding: 0;
      margin-bottom: var(--space-5);
    }
    margin-bottom: 0;
  }
  .pipeline-settings .columns {
    margin-bottom: 0;
  }
}
